<div class="bg-light lter b-b wrapper-md">
    <h4 class="m-n font-thin">首页</h4>
</div>

<div class="panel-body">
    <div class="wrapper-md ng-scope col-xs-9" ng-controller="statisticsCtrl">
        <div class="row">
            <div class="col-sm-12" >
                <div class="row row-sm text-center" >
                    <div class="col-xs-3">
                        <div class="panel padder-v bg-success item">
                            <div class="h1 text-white font-thin block">{{statistics.totalUser}}</div>
                            <span class="text-muted text-xs">微信用户</span>
                        </div>
                    </div>
                    <div class="col-xs-3">
                        <a href class="block panel padder-v bg-primary item">
                            <span class="text-white font-thin h1 block">{{statistics.totalShop}}</span>
                            <span class="text-muted text-xs">商户总数</span>
                        </a>
                    </div>
                    <div class="col-xs-3">
                        <a href class="block panel padder-v bg-info item">
                            <span class="text-white font-thin h1 block">{{statistics.todayShopApproval}}</span>
                            <span class="text-muted text-xs">商户待审批数</span>
                        </a>
                    </div>
                    <div class="col-xs-3">
                        <div class="panel padder-v item">
                            <div class="font-thin h1">{{statistics.todayGoodApproval}}</div>
                            <span class="text-muted text-xs">商品待审批数</span>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <div class="widget-header widget-header-flat col-sm-12">
            <div class="bottom text-left pull-left">
                <h4><i class="icon-bar-chart"></i>&nbsp;销售统计</h4>
            </div>
            <div class="pull-right">
                <div class="inline">
                    <p class="inline">年份:</p>
                    <div class="inline">
                        <select class="input-sm form-control" ng-model="ordersYears" ng-options="item for item in years" ng-change="changeYear()">
                        </select>
                    </div>
                </div>
                <div class="inline">
                    <p class="inline">月份:</p>
                    <div class="inline">
                        <select class="input-sm form-control" ng-model="ordersMonth" ng-options="item for item in months" ng-change="changeMonth()">
                        </select>
                    </div>
                </div>
            </div>
        </div >
        <div class="row">
            <div class="col-sm-12">
                <div>
                    <line id="main" legend="legend" item="item" data="data" serie="serie"></line>
                </div>
            </div>
        </div>
        <div ng-controller="miniAppsCtrl">
            <div class="widget-header widget-header-flat col-sm-12">
                <div class="bottom text-left pull-left">
                    <h4><i class="icon-bar-chart"></i>&nbsp;流量统计</h4>
                </div>
                <div class="pull-right">
                    <div class="inline">
                        <p class="inline">年份:</p>
                        <div class="inline">
                            <select class="input-sm form-control" ng-model="flowYears" ng-options="item for item in years" ng-change="alterYear()">
                            </select>
                        </div>
                    </div>
                    <div class="inline">
                        <p class="inline">月份:</p>
                        <div class="inline">
                            <select class="input-sm form-control" ng-model="flowMonth" ng-options="item for item in months" ng-change="alterMonth()">
                            </select>
                        </div>
                    </div>
                </div>
            </div >
            <div class="row">
                <div class="col-sm-12">
                    <div>
                        <line id="mini" legend="legend" item="item" data="data" serie="serie"></line>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="col-xs-3" ng-controller="noticesInfo">
        <div class="panel-body panel">
            <div class="panel-heading bg-light padder-m">
                <h5 class="font-bold">
                    <i class="icon-bell"></i>&nbsp;&nbsp;总部历史公告&nbsp;&nbsp; <a class="text-info" ui-sref="app.notice">查看更多</a>
                </h5>
            </div>
            <ul class="list-group">
                <li class="list-group-item ng-scope" ng-repeat="item in notices">
                    <p class="ng-binding"><h5 class="font-bold">{{item.name}}</h5></p>

                    <p class="ng-binding">
                        <h5 class="font-bold">来源:
                            <label class="label bg-info" ng-if='item.isShop==1'>商户</label>
                            <label class="label bg-danger" ng-if='item.isApi==1'>小程序</label>
                            <label class="label bg-success" ng-if='item.isCity==1'>城市中心</label>
                            <label class="label bg-primary" ng-if='item.isShop==0&&item.isCity==0&&item.isApi==0'>总部专属</label>
                        </h5>
                    </p>
                    <p class="ng-binding"></p>
                    <p class="l-h h5 m-b-xs ng-binding"><span class="font-bold">内容:</span>{{item.content|textLengthSet:true:50:'...'}}&nbsp;&nbsp;<a class="text-info" ui-sref="app.noticeDetail({id:item.id})">详情</a></p>
                    <p><small class="block text-muted ng-binding">
                        <span class="float-left"><i class="fa fa-fw fa-clock-o"></i> {{item.createdTime}}</span>
                        <span class="float-right">发布人:{{item.issuerName}}</span>
                    </small></p>
                </li>
            </ul>
            <div class="text-center" ng-if="notices.length==0">
                <span class="inline">~暂无公告~</span>
            </div>
        </div>
    </div>
</div>
